package com.itfreer.gis.map.resource;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itfreer.form.api.BaseRestService;
import com.itfreer.form.api.BaseService;
import com.itfreer.gis.map.resource.entity.ResourceContentEntity;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 定义资源目录服务
 */
@RestController
@RequestMapping("/gisresourcecontent")
@Api("资源目录")
public class RestResourceContentService extends BaseRestService<ResourceContentEntity> {

    @Autowired(required = false)
    private ResourceContentService service;

    @Reference(lazy = true, check = false)
    private ResourceContentService dubboService;

    @Override
    protected BaseService<ResourceContentEntity> getService() {
        if (service == null) {
            return dubboService;
        } else {
            return service;
        }
    }
}
